//
//  selectView.m
//  CarTown
//
//  Created by xionghao on 15/8/19.
//  Copyright (c) 2015年 熊浩. All rights reserved.
//

#import "selectView.h"

@implementation selectView
- (IBAction)selectclick:(UIButton *)sender {
    if ([_delegate respondsToSelector:@selector(selectclick:)]) {
        [_delegate selectclick:sender.tag];
    }
}
+(instancetype)selectview{
    selectView *select=[[[NSBundle mainBundle]loadNibNamed:@"selectView" owner:nil options:nil]lastObject];
    return select;
}
-(void)awakeFromNib{
    self.layer.borderWidth=0.5;
    self.layer.borderColor=[UIColorWithRGB(220, 240, 245) CGColor];
}

-(void)showView{
    [UIView animateWithDuration:0.5 animations:^{
        self.height=124;
    }];
}
-(void)hide{
   [UIView animateWithDuration:0.5 animations:^{
       self.height=0;
   } completion:^(BOOL finished) {
       [self removeFromSuperview];
   }];

}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
